// ImageAnnotation.h : Implementation of the CImageAnnotation class



// CImageAnnotation implementation

// code generated on 17 October 2007, 13:28

#include "stdafx.h"
#include "ImageAnnotation.h"
IMPLEMENT_DYNAMIC(CImageAnnotation, CRecordset)

CImageAnnotation::CImageAnnotation(CDatabase* pdb)
	: CRecordset(pdb)
{
	m_Image = "";
	m_Caption = "";
	m_Reference = "";
	m_RMO = "";
	m_Author = "";
	m_Keywords = "";
	m_Cluster = 0;
	m_PositionX = 0;
	m_PositionY = 0;
	m_PositionZ = 0;
	m_Feature;
	m_LPositionX = 0;
	m_LPositionY = 0;
	m_Linguistic;
	m_nFields = 14;
	m_nDefaultType = dynaset;
}

CString CImageAnnotation::GetDefaultConnect()
{
	return _T("DSN=ImageIndex;Description=An image database storing images path and annotations;UID=Administrator;PWD=cellmigration;APP=Microsoft\x00ae Visual Studio\x00ae 2005;WSID=D4FN7F2J;DATABASE=ImageCell;Network=DBMSSOCN;Address=134.226.38.17,1999");
}

CString CImageAnnotation::GetDefaultSQL()
{
	return _T("[dbo].[ImageAnnotation]");
}

void CImageAnnotation::DoFieldExchange(CFieldExchange* pFX)
{
	pFX->SetFieldType(CFieldExchange::outputColumn);
// Macros such as RFX_Text() and RFX_Int() are dependent on the
// type of the member variable, not the type of the field in the database.
// ODBC will try to automatically convert the column value to the requested type
	RFX_Text(pFX, _T("[Image]"), m_Image);
	RFX_Text(pFX, _T("[Caption]"), m_Caption, SHRT_MAX);
	RFX_Text(pFX, _T("[Reference]"), m_Reference, SHRT_MAX);
	RFX_Text(pFX, _T("[RMO]"), m_RMO, SHRT_MAX);
	RFX_Text(pFX, _T("[Author]"), m_Author);
	RFX_Text(pFX, _T("[Keywords]"), m_Keywords);
	RFX_Int(pFX, _T("[Cluster]"), m_Cluster);
	RFX_Int(pFX, _T("[PositionX]"), m_PositionX);
	RFX_Int(pFX, _T("[PositionY]"), m_PositionY);
	RFX_Int(pFX, _T("[PositionZ]"), m_PositionZ);
	RFX_LongBinary(pFX, _T("[Feature]"), m_Feature);
	RFX_Int(pFX, _T("[LPositionX]"), m_LPositionX);
	RFX_Int(pFX, _T("[LPositionY]"), m_LPositionY);
	RFX_LongBinary(pFX, _T("[Linguistic]"), m_Linguistic);

}
/////////////////////////////////////////////////////////////////////////////
// CImageAnnotation diagnostics

#ifdef _DEBUG
void CImageAnnotation::AssertValid() const
{
	CRecordset::AssertValid();
}

void CImageAnnotation::Dump(CDumpContext& dc) const
{
	CRecordset::Dump(dc);
}
#endif //_DEBUG


